package com.wn.cloud.consumer.fallback;

import com.wn.cloud.common.constant.ResponseEnum;
import com.wn.cloud.common.response.DataResult;
import com.wn.cloud.consumer.api.PaymentHystrixClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @FileName: PaymentFallback
 * @Description: TODO
 * @Author: MaWenHao
 * @Created: 2020/3/22 - 22:13
 * @Version: V1.0
 * @Company: 东方微银科技（北京）有限公司
 */
@Slf4j
@Component
public class PaymentFallback implements PaymentHystrixClient {
    @Override
    public DataResult<String> getOne(long id) {
        return DataResult.genDataResult(ResponseEnum.FALLBACK, "消费端全局fallback");
    }

    @Override
    public DataResult<String> getTimeout() {
        return DataResult.genDataResult(ResponseEnum.FALLBACK, "消费端全局fallback");
    }
}
